.text
.global _start

_start:

	/*关闭看门狗*/
	ldr r0, =0x53000000
	ldr r1, =0
	str r1, [r0]

	 /* 设置时钟*/
	 ldr r0, =0x4c000000
	 ldr r1, =0xffffffff
	 str r1, [r0]

	 /*CLKDIVN*/
	 ldr r0, =0x4c000014
	 ldr r1, =0x05
	 str r1, [r0]

	 /*设置cpu工作为异步模式*/
	 mrc p15,0,r0,c1,c0,0
	 orr r0,r0,#0xc0000000
	 mrc p15,0,r0,c1,c0,0

	 /*设置mpll */
	 ldr r0, =0x4c000004
	 ldr r1, =((92<<12) | (1 << 4) | (1 << 0))
	 str r1, [r0]

	/*分辨启动方式 通过写数据判断启动方式*/
	mov r1, #0
	ldr r0, [r1]
	str r1, [r1]
	ldr r2, [r1]
	cmp r1, r2
	ldr sp, =0x40000000 + 4096
	moveq sp, #4096
	streq r0, [r1]
	
	bl main
halt:
	b halt
	